#ifndef KEYBOARDEVENT_HPP
#define KEYBOARDEVENT_HPP

#include <string>
#include "Event.hpp"

class KeyboardEvent : public Event 
{
public:
    static const std::string KEY_UP;
    static const std::string KEY_DOWN;

    KeyboardEvent(const std::string &type, unsigned int charCodeValue = 0, 
            signed int keyCodeValue = 0, unsigned int keyLocationValue = 0, 
            bool ctrlKeyValue = false, bool altKeyValue = false, 
            bool shiftKeyValue = false, bool controlKeyValue = false, 
            bool commandKeyValue = false);
    virtual ~KeyboardEvent() { TRACEIN; TRACEOUT; }

    unsigned int charCode;
    unsigned int keyCode;
    unsigned int keyLocation;
    bool ctrlKey;
    bool altKey;
    bool shiftKey;
    bool controlKey;
    bool commandKey;

    virtual std::string toString(const std::string& more = "KeyboardEvent") const
    {
        TRACEIN;
        std::stringstream ss;
        ss << Event::toString(more) << "\n";
        ss << "\tcharCode: " << charCode << "\n";
        ss << "\tkeyCode: " << keyCode;
        TRACEOUT;
        return ss.str();
    }
};

#endif // KEYBOARDEVENT_HPP
